/*自定义过滤器*/
var filters = angular.module('filters', []);


filters.filter('key_format_name', function() {

  return function(key) {
    var tableKeyName = "";
    switch (key) {
      //表4
      case "defectIshandled":
        tableKeyName = "下承层缺陷是否处理完毕";
        break;
      case "subLayerHasUnconformityAggregate":
        tableKeyName = "下承层有无泥土、浮尘及松散集料";
        break;
      case "subLayerGlassGridIsFloating":
        tableKeyName = "玻纤网粘接情况有无上浮 ";
        break;
      case "subLayerHasPeelingAndPitchIsInPlace":
        tableKeyName = "下承层有无局部起皮、脱落或粘层沥青是否喷涂到位";
        break;
      case "subLayerCurbStoneSideHasSprayPitchAndHeightUnanimous":
        tableKeyName = "路缘石侧面是否涂刷乳化沥青，涂刷高度是否均匀一致";
        break;
      case "subLayerConstructionSurfaceAndBridgeWaterproofQuality":
        tableKeyName = "检查构造物表面质量情况和桥面防水层施工质量";
        break;
        //表6
      case "workCheckIHasTemporaryPollution":
        tableKeyName = "施工段落内有无临时污染";
        break;
      case "workCheckIRecordOfPaverDowntime":
        tableKeyName = "记录摊铺机停机情况";
        break;
      case "workCheckITimesOfPaverGatheringMixtutre":
        tableKeyName = "摊铺机拢料车次数";
        break;
      case "workCheckISpeedOfPaving":
        tableKeyName = "检查摊铺机摊铺速度";
        break;
      case "workCheckIPaverScreedTamperVibrationLevel":
        tableKeyName = "检查摊铺机熨平板夯锤振级（与试铺对比）";
        break;
      case "workCheckIWorkingsOfSpiralCaseAndBedLevel":
        tableKeyName = "检查螺旋布料器运转情况(连续、间断)及料位高度(1/2、1/3或其它)";
        break;
        //表8
      case "workCheckIISpeedAndTimesOfInitialPressure":
        tableKeyName = "检查初压速度及碾压遍数";
        break;
      case "workCheckIISpeedAndTimesOfNextPressure":
        tableKeyName = "检查复压速度及碾压遍数 ";
        break;
      case "workCheckIISteelRollerWaterSprayIsNormal":
        tableKeyName = "检查钢轮压路机喷水量是否正常";
        break;
      case "workCheckIIWidthOfLongitudinalSeam":
        tableKeyName = "检查纵向接缝搭接宽度";
        break;
        //表9
      case "temperatureCheckTemperatureOfPave":
        tableKeyName = "摊铺温度";
        break;
      case "temperatureCheckTemperatureOfInitialPressure":
        tableKeyName = "初压温度";
        break;
      case "temperatureCheckTemperatureOfNextPressure":
        tableKeyName = "复压温度";
        break;
      case "temperatureCheckTemperatureOfEndPressure":
        tableKeyName = "终压温度";
        break;
    };
    return tableKeyName;
  };
});

filters.filter('table_type_format_title', function() {

  return function(tableType) {
    var title = "";
    switch (tableType) {
      case 4:
        title = "下承层检查记录表";
        break;
      case 5:
        title = "工前检查记录";
        break;
      case 6:
        title = "施工监理检查记录表（一）";
        break;
      case 7:
        title = "混合料到场监理检查记录表";
        break;
      case 8:
        title = "施工监理检查记录表（二）";
        break;
      case 9:
        title = "施工监理检查记录表（二）";
        break;
      case 10:
        title = "松铺厚度监理检查记录表";
        break;
    };
    return title;
  };
});


filters.filter('layerType_format_name', function() {

  return function(tableType) {
    var layerName = "";
    switch (tableType) {
      case 1:
        layerName = "上面层";
        break;
      case 2:
        layerName = "中面层";
        break;
      case 3:
        layerName = "下面层";
        break;
    };
    return layerName
  };
});